package corej.course.gui.eventmonitor;

//�ӿ�EmotionListener��ʵ����
public class Boy1 implements EmotionListener {
    String name;

    public Boy1(String name) {
        this.name = name;
    }

    public void whatCanIdoWhenGirlHappy(EmotionEvent e) {
        Object o = e.getSource();
        Girl g = (Girl) o;
        String girlName = g.getName();
        System.out.println(name + " said: " + girlName + ", ��ˬ��Ҳˬ,���ˬ�������ˬ");
    }

    public void whatCanIdoWhenGirlSad(EmotionEvent e) {
        Object o = e.getSource();
        Girl g = (Girl) o;
        String girlName = g.getName();
        System.out.println(name + " said: " + girlName + ", �㲻ˬ����Ҳ��ˬ");

    }

}
